# vim: set fileencoding=utf8:
from django.shortcuts import render_to_response
from django.template import RequestContext

from vapi.person.models import Person
from vapi.tools.leecher import VkontakteLeecher

def index(request):
    
    leecher = VkontakteLeecher("ad3002@gmail.com", "toteato", "d:/vk/")
    pdata = leecher.person_dict
    news = leecher.news()
    
    
    
    context = { 'page_title' : 'Мой вконтакте',
                'fullname' : str(pdata['name'] + " " + pdata['surname']),
                'nickname' : pdata['nickname'],
                'idnum' : news[1][3],
            }
    
    return render_to_response('index.html',context_instance=RequestContext(request,
                                                                          context))